#include "Rata.h"
Rata::Rata(){
  Gender a=static_cast<Gender>(rand()%2);
  Culoare b=static_cast<Culoare>(rand()%4);
  (*this).limitaVarsta=100;
  (*this).varsta=0;
  (*this).sex=a;
  (*this).culoarePene=b;
  (*this).oua=2;
  (*this).specie=rata;
}

 void Rata::print(){
  std::cout<<"Rata |";
    if ((*this).isMale()) std::cout<<" Sex: M |";
  else std::cout<<" Sex: F |";
  std::cout<<" Varsta: "<<(*this).getVarsta()<<" | ";
  if ((*this).getCuloarePene()==alb) std::cout<<"Culoare pene: alba\n";
  if ((*this).getCuloarePene()==negru) std::cout<<"Culoare pene: neagra\n";
  if ((*this).getCuloarePene()==gri) std::cout<<"Culoare pene: gri\n";
  if ((*this).getCuloarePene()==maro) std::cout<<"Culoare pene: maro\n";
}
Rata* Rata::giveBirth(){
   (*this).oua--;
   return new Rata();
}
bool Rata::isGestant()
  {
    if ((*this).isMale()) return false;
    else if((*this).getNrOua()>0&&(*this).getVarsta()>5) return true;
    return false;
  }
void Rata::distruge()
  {
     this->~Rata();
  }
